package cn.wolfcode.wolf2w.repository;

import cn.wolfcode.wolf2w.domain.Destination;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface DestinationRepository extends MongoRepository<Destination,String>{
    List<Destination> findByIdIn(List<String> ids);

    List<Destination> findByDeep(int deep);

    List<Destination> findByParentName(String 中国);

    /**
     * 查询热门区域对应的目的地
     * @param id
     * @param pageable
     * @return 目的地集合
     */
    List<Destination> findByParentId(String id, Pageable pageable);
}
